sonic-boom
Advanced tools
Comparing version 3.2.1 to 3.3.0
@@ -129,3 +129,3 @@ 'use strict' | ||
if (err) { | ||
if (err.code === 'EAGAIN' && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { | ||
if ((err.code === 'EAGAIN' || err.code === 'EBUSY') && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { | ||
if (this.sync) { | ||
@@ -381,3 +381,4 @@ // This error code should not happen in sync mode, because it is | ||
} catch (err) { | ||
if (err.code !== 'EAGAIN' || !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { | ||
const shouldRetry = err.code === 'EAGAIN' || err.code === 'EBUSY' | ||
if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { | ||
throw err | ||
@@ -384,0 +385,0 @@ } |
{ | ||
"name": "sonic-boom", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "Extremely fast utf8 only stream implementation", | ||
@@ -9,4 +9,4 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "npm run test:types && standard && tap test.js", | ||
"test:unit": "tap test.js", | ||
"test": "npm run test:types && standard && npm run test:unit", | ||
"test:unit": "tap", | ||
"test:types": "tsc && tsd && ts-node types/tests/test.ts", | ||
@@ -41,4 +41,4 @@ "prepare": "husky install" | ||
"tap": "^16.2.0", | ||
"tsd": "^0.25.0", | ||
"typescript": "^4.7.2", | ||
"tsd": "^0.28.0", | ||
"typescript": "^5.0.2", | ||
"ts-node": "^10.8.0" | ||
@@ -45,0 +45,0 @@ }, |
@@ -71,3 +71,3 @@ # sonic-boom | ||
* `retryEAGAIN(err, writeBufferLen, remainingBufferLen)`: a function that will be called when sonic-boom | ||
write/writeSync/flushSync encounters a EAGAIN error. If the return value is | ||
write/writeSync/flushSync encounters a EAGAIN or EBUSY error. If the return value is | ||
true sonic-boom will retry the operation, otherwise it will bubble the | ||
@@ -74,0 +74,0 @@ error. `err` is the error that caused this function to be called, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66403
25
2093
14
2