don't prepend raw close code anymore
thanks to recent crystal changes adding support for close reasons we don't need to encode things anymore.
This commit is contained in:
parent
faeaeb4fba
commit
bba5bef505
1 changed files with 1 additions and 3 deletions
|
@ -50,11 +50,9 @@ module Kemal
|
||||||
message = "Exception"
|
message = "Exception"
|
||||||
end
|
end
|
||||||
|
|
||||||
raw = uninitialized UInt8[2]
|
|
||||||
IO::ByteFormat::BigEndian.encode(code, raw.to_slice)
|
|
||||||
socket.not_nil!.close(
|
socket.not_nil!.close(
|
||||||
HTTP::WebSocket::CloseCode.new(code),
|
HTTP::WebSocket::CloseCode.new(code),
|
||||||
message: String.new(raw.to_slice) + message
|
message: message
|
||||||
)
|
)
|
||||||
|
|
||||||
raise error unless error.is_a?(WebsocketError)
|
raise error unless error.is_a?(WebsocketError)
|
||||||
|
|
Loading…
Reference in a new issue