Add misspell
This commit is contained in:
parent
807ea96d67
commit
a94881f1d4
3 changed files with 7 additions and 3 deletions
4
.golangci.toml
Normal file
4
.golangci.toml
Normal file
|
@ -0,0 +1,4 @@
|
|||
[linters]
|
||||
enable = [
|
||||
"misspell"
|
||||
]
|
|
@ -65,7 +65,7 @@ func (s *Session) Connect(req ConnectionRequest) {
|
|||
}
|
||||
}
|
||||
|
||||
// Starts a loop the recieves and responds to packets
|
||||
// Starts a loop the receives and responds to packets
|
||||
func (s *Session) HandlerLoop() {
|
||||
go s.Connection.PacketReadLoop()
|
||||
for s.Connection != nil {
|
||||
|
|
|
@ -73,12 +73,12 @@ func NewConnection(rw io.ReadWriteCloser) (ConnectionRequest, error) {
|
|||
packet, err := conn.readPacket()
|
||||
conPack, isConn := (*packet).(packets.ConnectPacket)
|
||||
if !isConn {
|
||||
log.Println("Didn't recieve a connect packet")
|
||||
log.Println("Didn't receive a connect packet")
|
||||
err := packets.DisconnectPacket{
|
||||
ReasonCode: packets.DisconnectReasonCodeProtocolError,
|
||||
}.Write(rw)
|
||||
if err != nil {
|
||||
log.Println("Failed to disconnect after not recieving a connect packet", err)
|
||||
log.Println("Failed to disconnect after not receiving a connect packet", err)
|
||||
}
|
||||
return connReq, FirstPackNotConnect
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue