mirror of https://github.com/sbt/sbt.git
Synchronize ServerConnection.sendString
Without synchronization, it is possible to interlace liens from multiple messages which causes parsing to fail on the server side.
This commit is contained in:
parent
ddc4e850b5
commit
4eedaea49e
|
|
@ -62,7 +62,7 @@ abstract class ServerConnection(connection: Socket) {
|
|||
}
|
||||
thread.start()
|
||||
|
||||
def sendString(message: String): Unit = {
|
||||
def sendString(message: String): Unit = this.synchronized {
|
||||
val a = message.getBytes("UTF-8")
|
||||
writeLine(s"""Content-Length: ${a.length + 2}""".getBytes("UTF-8"))
|
||||
writeLine(Array())
|
||||
|
|
|
|||
Loading…
Reference in New Issue