I think the easiest fix is to acquire permission with the connection lock, then proceed to write with the framewriter.

```
    synchronized (SpdyConnection.this) {
      awaitWriteWindow(byteCount);
      addBytesToWriteWindow(-byteCount);
    }
    frameWriter.data(outFinished, streamId, buffer, offset, byteCount);
```